import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import asides from '../views/aside.vue'
import xueyuan from '../views/xueyuan.vue'
import zhujiao from '../views/zhuj.vue'
import jiangshi from '../views/jiangshi.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,

    children:[{
      path: '/asides',
      name: 'asides',
      component: asides,
    },
    {
      path: '/xueyuan',
      name: 'xueyuan',
      component: xueyuan,
    },
    {
      path: '/zhujiao',
      name: 'zhujiao',
      component: zhujiao,
    },
    {
      path: '/jiangshi',
      name: 'jiangshi',
      component: jiangshi,
    },]

  },
 
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
